﻿using System;

namespace Neoseeker.NAMFox.Tests
{
    /// <summary>
    /// Relates a test method to a specific issue.
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public sealed class IssueAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="IssueAttribute"/> class.
        /// </summary>
        /// <param name="issueId">The ID of the issue</param>
        public IssueAttribute(int issueId)
        {
            this.IssueId = issueId;
        }

        /// <summary>
        /// Gets the ID of the issue.
        /// </summary>
        public int IssueId
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the URI of the issue.
        /// </summary>
        public Uri IssueUri
        {
            get
            {
                return new Uri("http://code.google.com/p/namfox/issues/detail?id=" + this.IssueId);
            }
        }
    }
}
